using System;
class rohit
{
    public string name,chh;
    public int age,i,n,z;
    public int num;
    public char choice;
    public char choose,rlb;

    void acc()
    {
        Console.WriteLine("This is a program which helps you to book tickets");
        
        for (int k = 0; k <= 1; k++)
        {
            Console.WriteLine("Do you want to continue or not (yes/no)");
            chh = Console.ReadLine();
            if (chh == "yes")
            {
                Console.WriteLine("\n1. Book tickets\t2. Unbooked tickets");
                choice = Convert.ToChar(Console.ReadLine());
                switch (choice)
                {
                    case '1':
                        {
                            
                                Console.WriteLine("a. For 5 tickets\tb. For 10 tickets");
                                choose = Convert.ToChar(Console.ReadLine());
                                switch (choose)
                                {
                                    case 'a':
                                        {
                                            
                                            for (i = 1; i <= 5; i++)
                                            {
                                                Console.WriteLine("\nDo you want to continue (y/n)");
                                                rlb=Convert.ToChar(Console.ReadLine());
                                                if (rlb == 'y')
                                                {


                                                    Console.WriteLine("\n\nEnter customer name");
                                                    name = Console.ReadLine();

                                                    Console.WriteLine("Enter customer age");
                                                    age = Convert.ToInt32(Console.ReadLine());
                                                    num = 5 - i;
                                                    n = 0;
                                                    z = n + i;



                                                    Console.WriteLine("Your name is: {0} Your age is: {1}", name, age);
                                                    Console.WriteLine("Your seat is booked");
                                                    Console.WriteLine("Your seat number is: " + i);
                                                    Console.WriteLine("Total Seates reserved " + z);
                                                    Console.WriteLine("Total seates unreserved" + num);
                                                    
                                                }
                                                else
                                                {
                                                    Console.WriteLine("Thanks");
                                                }
                                                
                                            }
                                            
                                            break;
 
                                        }

                                    case 'b':
                                        {
                                            for (i = 1; i <= 10; i++)
                                            {
                                                Console.WriteLine("\nDo you want to continue (y/n)");
                                                rlb = Convert.ToChar(Console.ReadLine());
                                                if (rlb == 'y')
                                                {


                                                    Console.WriteLine("\n\nEnter customer name");
                                                    name = Console.ReadLine();

                                                    Console.WriteLine("Enter customer age");
                                                    age = Convert.ToInt32(Console.ReadLine());
                                                    num = 10 - i;
                                                    n = 0;
                                                    z = n + i;



                                                    Console.WriteLine("Your name is: {0} Your age is: {1}", name, age);
                                                    Console.WriteLine("Your seat is booked");
                                                    Console.WriteLine("Your seat number is: " + i);
                                                    Console.WriteLine("Total Seates reserved " + z);
                                                    Console.WriteLine("Total seates unreserved" + num);

                                                }
                                                else
                                                {
                                                    Console.WriteLine("Thanks");
                                                }

                                            }
                                            break;
                                        }
                                    default:
                                        {
                                            Console.WriteLine("You are not a valid user \nChoose any correct option");
                                            break;
                                        
                                        }
                                }
                                
                                    
                        

                                
                            
                            break;

                        }
                    case '2':
                        {
                            
                            Console.WriteLine("Total un reserved seats are:  " + num);
                            break;


                        }

                    default:
                        {
                            Console.WriteLine("Thanks for using this program");
                            break;
                        }

                }
            }

            else
            {
                Console.WriteLine("You are not a valid user");

            }
        }

    
    }
    static void Main()
    {
        rohit oo = new rohit();
        oo.acc();
        Console.ReadLine();
    
    }

}